CITS3002 Notes




cd -

Written by Jeremy Butson 2024 based on UWA CITS3002 Lecture Notes

Introduction

Definitions:

Internet Protocols:

ISO/OSI Reference Model:

  1. THE PHYSICAL LAYER: is responsible for transmitting a (raw) bit stream over the physical communication medium.
  2. THE DATA-LINK LAYER: takes the bit stream from the physical layer and constructs logical chunks of data termed frames.
  3. THE NETWORK LAYER: is responsible for providing the connection between "end systems" across a network. Network layer functions include:
    1. Routing: deciding how to transmit frames between source and destination using addresses
    2. Relaying: enables data transfer across intermediate networks
    3. Flow control: matches traffic flow with physical capacity of a transmission path
    4. Sequencing: control ordering of frames across a network
  4. THE TRANSPORT LAYER: provides a reliable end-to-end service independent of the network topology. This is achieved by splitting messages into network sized packets and joining them back together again at the other end.
  5. THE SESSION LAYER: is the upper layer crucial to internetworking and manages the dialogue between end systems. Typically provides:
    1. establishment and closing of connections
    2. synchronization to allow checking and recovery of data
    3. negotiation of full and half duplex communication
  6. THE PRESENTATION LAYER: provides a standard format for transferred information by overcoming compatibility problems between systems using dissimilar data encoding rules and possibly different display technologies.
  7. THE APPLICATION LAYER: provides the interface between the application processes. In particular, functions such as file transfer, remote job execution and application dependent virtual terminal support are provided.

The Physical Layer

Physical Layer Responsibilities:

Metrics of Network Measurement:

Transmission Errors:

How Data Is Placed In Frames:

Phase Encoding Of Signals:

Hamming's Correction of Single-Bit Errors:

How Does Checksum Error Detection Work?

  1. Break original message into k blocks of n bits
  2. Sum all k blocks
  3. Add the carry to the sum and take the 1's complement
  4. If when the receiver sums the k blocks and the check sum block and it adds to all 1s, then it accepts the data, otherwise it is wrong

How Does CRC (Cyclic Redundancy Check) Work?

  1. Find the length of divisor ('L' in this example)
  2. Append L-1 bits to the original message
  3. Perform binary division operation
  4. Remainder is the CRC
    1. The CRC hence is L-1 bits

Data Link Layer

Some Declarations for Introductory Protocols:

#define MAX_DATA_SIZE 1000

typedef struct {
    int len; //length of the payload
    char data[MAX_DATA_SIZE];
} FRAME;

#define FRAME_HEADER_SIZE (sizeof(FRAME) - sizeof(FRAME.data))
#define FRAME_SIZE(f) (FRAME_HEADER_SIZE + f.len)

The Unrestricted Simplex Protocol:

FRAME frame;
int   len, link = 1;

while( true ) {
    READ_NETWORK_LAYER(frame.data, &len);
    frame.len = len;
    WRITE_PHYSICAL_LAYER(link, &frame, FRAME_SIZE(frame));
}
FRAME frame;
int   len, link;

while( true ) {
    READ_PHYSICAL_LAYER(&link, &frame, &len);
    WRITE_NETWORK_LAYER(frame.data, frame.len);           
}

Software Simulations:

Frame Pipelining:

LANs & WLANs

Simplified Satellite Broadcasting

Channel Allocation

Local Area Networks

"A LAN is a routerless network, using the same protocol stack for each device, and using only uniform, local, networking media."

Carrier Sense Networks

IEEE-802.x LAN Standards - The Ethernet System

Ethernet Contention Algorithm

Packet Transport Mechanisms

Hubs, Switches and Collision Domains

IEEE-802.11 Wireless LAN Protocol

Hidden Node

Collision Avoidance (802.11)

Network Layer

Network Layer Design Objectives

Responsibilities of the Network Layer

Network Layer Header Management

Path of Frames and Packets

Network Layer Routing Algorithms

Two Classes of Routing Algorithm

Congestion and Flow-Control in the Network Layer

Load Shedding

TCP/IP Protocols

TCP/IP Protocol Layers & Common Protocols

Requirements of Internetworking

Initial Internet Concepts

Ground Rules:

Address Resolution Protocol (ARP)

Configuration of Network Devices

Problems with Static Configuration

Bootstrap Protocol (BOOTP)

Dynamic Host Configuration Protocol (DHCP)

Internet Protocol (IP) Datagrams

Internet Control Message Protocol (ICMP)

Transport Layer

Port Numbers

Transmission Control Protocol (TCP)

TCP/IP Transmissions

TCP/IP Congestion Control

Network Application Program Interfaces (APIs)

Berkeley Sockets (a network API)

Client-Server

Client/Server Software Architectures

Partitioning Client/Server Responsibilities

Two Tier and Three Tier Architecture

Concurrency in Servers

The Internet Supervisor Daemon - inetd

Architecture Independent Applications

Automated Development of Distributed Applications

The complications of layering in the OSI model come to a head in the Session Layer and a number of recent developments have 'bypassed' many of the OSI layers These have been motivated by:

Remote Procedure Call (RPC) Paradigm

Based on the observation that procedure calls are a well understood mechanism for control transfer. The proposal is that procedure calls may be consistently extended to access remote environments (other machines). When a remote procedure call is invoked:

RPC Execution Order

  1. The client calls a local procedure (client stub), which appears to the client that the stub is an actual procedure, the purpose is to package arguments to the remote procedure
  2. The network messages are sent to the local kernel using a sys call
  3. The network messages are then sent to a remote kernel
  4. The server stub has been waiting on any client's request, unmarshalling the arguments from the network messages and converts them to its format
  5. The SS then executes a local procedure call
  6. When the procedure finishes, it returns to the SS
  7. The SS then converts the return values if necessary and builds one or more network messages
  8. Messages traverse network
  9. The CS reads the replies from the local kernel
  10. The CS returns to the calling procedure, control flow is again in the clients code

SUN Microsystem's RPC Compiler rpcgen

Naming and Interface Binding

Security of TCP/IP

The 4 layers of the TCP/IP suite, has multiple potential vulnerabilities:

Packet Sniffing

TCP/IP Port Scanning

Stealth Port Scanning

IP Spoofing

UDP Packet Spoofing

DoS Attacks

Smurf DDoS Attack

Security at Network Boundaries

Packet Filtering at Network Boundaries

Possible Packet Filtering Criteria

Developing a Firewall Policy

iptables

IP Masquerading or Network Address Translation (NAT)

Connection Tracking

Cryptography

ISO/OSI Security Architecture

Where should encryption be performed?

Terminology